package chapter1;

/**
 * @author ycj
 * @version 1.0
 * @description: TODO
 * @date 2022/5/16
 */
public class Source1_2 {
    public static void main(String[] args) {
        //创建线程
        Welcome welcome = new Welcome();

        //启动线程
        welcome.start();

        System.out.println("欢迎我是线程="+Thread.currentThread().getName());

        //欢迎我是线程=main
        //欢迎我是线程=Thread-0

    }
}

class Welcome extends Thread{
    @Override
    public void run() {
        System.out.println("欢迎我是线程="+Thread.currentThread().getName());
    }
}
